1. /* sloslor.cpp by K.Tsuru */
  2. // function ID = 232 DRADIX
  3. /********************************************************
  4. SLong class
  5. bit or operator m|n
  6. It does not consider the sign and return a positive value.
  7. [Argorithm]
  8. 1.radix converion to SInteger with radix BRADIX
  9. 2.take bit or for each figure
  10. 3.reverse conversion
  11. *********************************************************/
  12. #ifndef SN_H
  13. #include "sn.h"
  14. #endif
  15. SLong operator|(const SLong& m, const SLong& n){
  16. if(m.Sign(232) == 0) return n;
  17. if(n.Sign(232) == 0) return m;
  18. SInteger M, N;
  19. //convert to binary
  20. M = M.ConvToBin(m); N = N.ConvToBin(n);
  21. M = M | N;
  22. return M.ConvToDec(); //convert to decimal
  23. }

sloslor.cpp : last modifiled at 2015/11/27 14:27:07(690 bytes)
created at 2017/10/07 10:26:50
The creation time of this html file is 2017/11/09 14:52:03 (Thu Nov 09 14:52:03 2017).